﻿<%@ Page Language="C#" MasterPageFile="AdminSite.master" AutoEventWireup="true" CodeFile="BangGiaVe.aspx.cs"
    Inherits="BangGiaVe"%>

<%@ Register assembly="CKEditor.NET" namespace="CKEditor.NET" tagprefix="CKEditor" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        .style2
        {
            height: 21px;
            width: 5537px;
        }
        .style3
        {
            width: 849px;
            height: 21px;
        }
        .style5
        {
            height: 24px;
        }
        .style6
        {
            height: 24px;
        }
        #noidung
        {
            width: 912px;
        }
        #txtNoiDung
        {
            height: 102px;
            width: 908px;
        }
        .style7
        {
            height: 14px;
        }
        .style25
        {
            width: 736px;
            height: 24px;
        }
        .style26
        {
            width: 18px;
            height: 24px;
        }
        .style29
        {
            width: 5537px;
            height: 24px;
        }
        .style30
        {
            width: 420px;
            height: 24px;
        }
        .style31
        {
            width: 513px;
            height: 24px;
        }
        .style32
        {
            width: 560px;
            height: 24px;
        }
        .style33
        {
            width: 412px;
            height: 24px;
        }
        .style34
        {
            width: 5537px;
            height: 25px;
        }
        .style35
        {
            height: 25px;
        }
        .style36
        {
            width: 803px;
        }
        .style38
        {
        }
        .style39
        {
            width: 351px;
        }
        .style41
        {
            width: 333px;
            height: 26px;
        }
        .style42
        {
            width: 351px;
            height: 26px;
        }
        .style43
        {
            width: 803px;
            height: 26px;
        }
        .style44
        {
            height: 26px;
        }
        .style45
        {
        }
        .style46
        {
            width: 555px;
            height: 40px;
        }
        .style47
        {
            height: 40px;
        }
        </style>
     
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
   
    <h2 align="center" style="font-weight: bold">
                <asp:Label ID="lblTitle" runat="server" Text="BẢNG GIÁ VÉ XE" 
            Font-Bold="True"></asp:Label>
            </h2>
    <asp:ValidationSummary ID="BangGiaValidationSummary" runat="server" CssClass="failureNotification"
        ValidationGroup="BangGiaValidationGroup" DisplayMode="List" />
    <table>
        <tr>
            <td class="style29">
                <asp:Label ID="Label2" runat="server" Text="Người tạo:"></asp:Label>
            </td>
            <td class="style32">
                <asp:Label ID="lblNguoiTao" runat="server" Text="" Font-Bold="True"></asp:Label>
            </td>
            <td class="style33">
                <asp:Label ID="Label3" runat="server" Text="Ngày tạo:"></asp:Label>
            </td>
            <td class="style30">
                <asp:Label ID="lblNgayTao" runat="server" Text="" Font-Bold="True"></asp:Label>
            </td>
            <td class="style31">
                <asp:Label ID="lblNguoiCNCaption" runat="server" Text="Người  sửa:"></asp:Label>
            </td>
            <td class="style26">
                <asp:Label ID="lblNguoiCapNhat" runat="server" Text="" Font-Bold="True"></asp:Label>
            </td>
            <td class="style25">
                <asp:Label ID="lblNgayCNCaption" runat="server" Text="Ngày sửa:"></asp:Label>
            </td>
            <td class="style6">
                <asp:Label ID="lblNgayCapNhat" runat="server" Font-Bold="True"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label1" runat="server" Text="Tên bảng giá"></asp:Label>
            </td>
            <td class="style3" colspan="7">
                <asp:TextBox ID="txtTenBangGia" runat="server" Width="95%" Font-Bold="True"></asp:TextBox>
                <asp:RequiredFieldValidator ID="TenBangGiaRequired" runat="server" ControlToValidate="txtTenBangGia"
                    CssClass="failureNotification" ErrorMessage="* Bạn chưa nhập tên bảng giá"
                    ToolTip="Vui lòng nhập tên bảng giá." ValidationGroup="BangGiaValidationGroup">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style29" valign="top">
                <asp:Label ID="Label4" runat="server" Text="Mô tả"></asp:Label>
            </td>
            <td class="style6" colspan="7">
               <CKEditor:CKEditorControl ID="txtMoTa" runat="server" Height="83px" 
                    Width="760px"></CKEditor:CKEditorControl>
            </td>
        </tr>
        <tr>
            <td class="style34">
            </td>
            <td class="style35" colspan="7">
                <asp:CheckBox ID="ckcApDung" runat="server" Text="Áp dụng" Font-Bold="False" />
            </td>
        </tr>
        <tr>
            <td class="style5" align="center" colspan="8">
                <asp:Button CssClass="btnadmin" ID="btnSave" runat="server" Text="Lưu" Width="79px" ValidationGroup="BangGiaValidationGroup"
                    OnClick="btnSave_Click" />
                <asp:Button CssClass="btnadmin" ID="btnNew" runat="server" Text="Tạo mới" ViewStateMode="Disabled" Width="92px"
                    OnClick="btnNew_Click" />
                <asp:Button CssClass="btnadmin" ID="btnDelete" runat="server" Text="Xóa bảng giá" OnClick="btnDelete_Click"
                    Width="91px" />
                <asp:Button CssClass="btnadmin" ID="btnBack" runat="server" Text="Quản lý bảng giá" 
                    OnClick="btnBack_Click" />
                <asp:HiddenField ID="keyField" runat="server" />
            </td>
        </tr>
        <tr>
            <td  colspan="8">
            <div id="divChiTiet" runat="server" > 
             <fieldset >   <legend>Chi tiết bảng giá</legend> 
             <table>
            <tr>
            <td class="style44"  >
    <asp:ValidationSummary ID="DetailValidationSummary" runat="server" CssClass="failureNotification"
        ValidationGroup="DetailValidationGroup" DisplayMode="List" />
                </td>
            </tr>
           <tr>
            <td class="style45" align="center" colspan="4" valign="top">
            <table>
             <tr>
            <td class="style44" align="left">
                <asp:Label ID="Label5" runat="server" Text="Tuyến đường"></asp:Label>
                :</td>
            <td class="style41" align="left">
                <asp:DropDownList ID="ddlTuyenDuong" runat="server" Width="268px" Height="23px">
                </asp:DropDownList>
                  <asp:RequiredFieldValidator ID="TuyenDuongFieldValidator1" runat="server" ControlToValidate="ddlTuyenDuong"
                  InitialValue="-1"   CssClass="failureNotification" ErrorMessage="* Bạn chưa chọn tuyến đường"
                    ToolTip="Vui lòng chọn tuyến đường" ValidationGroup="DetailValidationGroup">*</asp:RequiredFieldValidator>
            </td>
            <td class="style42" align="left">
                <asp:Label ID="Label6" runat="server" Text="Loại xe"></asp:Label>
            </td>
            <td class="style43" align="left">
                <asp:DropDownList ID="ddlLoaiXe" runat="server" Height="23px" Width="303px">
                </asp:DropDownList>
                   <asp:RequiredFieldValidator ID="LoaiXeFieldValidator1" runat="server" ControlToValidate="ddlTuyenDuong"
                  InitialValue="-1"   CssClass="failureNotification" ErrorMessage="* Bạn chưa chọn loại xe"
                    ToolTip="Vui lòng chọn  loại xe" ValidationGroup="DetailValidationGroup">*</asp:RequiredFieldValidator>
            </td>
            </tr>
            <tr>
            <td class="style45" align="left">
                <asp:Label ID="Label7" runat="server" Text="Bến đi"></asp:Label>
            </td>
            <td class="style38" align="left">
                <asp:TextBox ID="txtBenDi" runat="server" Width="92%" Font-Bold="False" 
                    Height="22px"></asp:TextBox>
            </td>
            <td class="style39" align="left">
                <asp:Label ID="Label8" runat="server" Text="Bến đến"></asp:Label>
            </td>
            <td class="style36" align="left">
                <asp:TextBox ID="txtBenDen" runat="server" Width="77%" Font-Bold="False" 
                    Height="23px"></asp:TextBox>
            </td>
            </tr>
            <tr>
            <td class="style45" align="left">
                <asp:Label ID="Label9" runat="server" Text="Giá vé"></asp:Label>
            </td>
            <td class="style38" align="left">
                <asp:TextBox ID="txtGiaVe" runat="server" Width="92%" Font-Bold="False" 
                    Height="23px"></asp:TextBox>
                 <asp:RegularExpressionValidator ID="GiaVeFieldValidator1" runat="server" ControlToValidate="txtGiaVe"
                    CssClass="failureNotification" ErrorMessage="* Giá vé phải là số" ValidationExpression="^\d+$" 
                    ToolTip="Vui lòng nhập giá vé dạng số" ValidationGroup="DetailValidationGroup">*</asp:RegularExpressionValidator>
            </td>
            <td class="style39" align="left">
                <asp:Label ID="Label10" runat="server" Text="Phụ thu"></asp:Label>
            </td>
            <td class="style36" align="left">
                <asp:TextBox ID="txtPhuThu" runat="server" Width="77%" Font-Bold="False" 
                    Height="23px"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="PhuThuExpressionValidator1" runat="server" ControlToValidate="txtPhuThu"
                    CssClass="failureNotification" ErrorMessage="* Phụ thu phải là số" ValidationExpression="^\d+$" 
                    ToolTip="Vui lòng nhập phụ thu dạng số" ValidationGroup="DetailValidationGroup">*</asp:RegularExpressionValidator>
            </td>
            </tr>
            <tr>
            <td class="style46" valign="top" align="left">
                <asp:Label ID="Label11" runat="server" Text="Ghu chú"></asp:Label>
            </td>
            <td class="style47" colspan="3" align="left">
                <asp:TextBox ID="txtGhiChu" runat="server" Width="89%" Font-Bold="True" 
                    style="margin-bottom: 0px" TextMode="MultiLine" Height="33px"></asp:TextBox>
            </td>
            </tr>
            </table>
                </td>
            </tr>
            <tr>
            <td class="style45" align="center"valign="top">
                <asp:Button CssClass="btnadmin" ID="btnSaveDetail" runat="server" Text="Lưu chi tiết" ValidationGroup="DetailValidationGroup"
                    Width="128px" OnClick="btnSaveDetail_Click" />
                <asp:Button CssClass="btnadmin" ID="btnNewDetail" runat="server" Text="Thêm chi tiết" Width="116px" 
                    OnClick="btnNewDetail_Click" />
                <asp:HiddenField ID="keyFieldDetail" runat="server" />
            </td>
            </tr>
            <tr>
            <td class="style45" valign="top">
        <asp:GridView ID="gridViewData"  CssClass="grid-view"    runat="server" CellPadding="3" Width="859px"
            AutoGenerateColumns="False" GridLines="Vertical" 
            onrowcommand="gridViewData_RowCommand" 
            onrowdatabound="gridViewData_RowDataBound" ShowHeaderWhenEmpty="True" 
                    Height="96px">
            
            <Columns>
                <asp:ButtonField Text="Sửa" CommandName="cmdEdit"  >
                <ControlStyle Font-Underline="True" />
                </asp:ButtonField>
                <asp:ButtonField Text="Xóa" CommandName="cmdDelete" >
                <ControlStyle Font-Underline="True" />
                </asp:ButtonField>
                <asp:BoundField HeaderText="STT" DataField="STT" >
                <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="TEN_TUYEN_DUONG" HeaderText="Tuyến đường" />
                <asp:BoundField HeaderText="Bến đi" DataField="BEN_DI" />
                <asp:BoundField HeaderText="Bến đến" DataField="BEN_DEN" />
                <asp:BoundField DataField="TEN_LOAI_XE" HeaderText="Loại xe" />
                <asp:BoundField DataField="GIA_VE" DataFormatString="{0:f}" ItemStyle-HorizontalAlign="Center" 
                    HeaderText="Giá vé" />
                <asp:BoundField DataField="PHU_THU" DataFormatString="{0:f}"  ItemStyle-HorizontalAlign="Center" 
                    HeaderText="Phụ thu" />
                <asp:BoundField DataField="GHI_CHU" HeaderText="Ghi chú" />
            </Columns>
           <FooterStyle CssClass="gridfooter"/>
            <HeaderStyle CssClass="gridheader" />
            <PagerStyle CssClass="gridpager"/>
            <RowStyle CssClass="gridrownormal" />       
            <AlternatingRowStyle CssClass="gridrowalternate" />
            <SelectedRowStyle CssClass="gridselected"  />
            <SortedAscendingCellStyle  CssClass="gridrowsortasc" />
            <SortedAscendingHeaderStyle CssClass="gridheadersortasc" />
            <SortedDescendingCellStyle CssClass="gridrowsortdesc"/>
            <SortedDescendingHeaderStyle CssClass="gridheadersortdesc" />
        </asp:GridView>
            </td>
            </tr>
             </table>
             </fieldset>
             </div></td>
        </tr>
        <tr>
            <td class="style7" colspan="8" align="center">
                &nbsp;</td>
        </tr>
    </table>
    
</asp:Content>
